3<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="./lib/vue-2.4.0.js"></script>
</head>

<body>
    <div id="app">
        <brother></brother>

        <sister></sister>
    </div>
</body>

<script>
    var VueEvent = new Vue();


    var brother = {
        template: "<h1>我是哥哥======={{sis}}</h1>",
        data() {
            return {
                brother_: "我是哥哥",
                sis:""
            }
        },
        methods: {

        },
        mounted() {
            VueEvent.$on('girls', (data)=>{
                console.log(data,888)
                this.sis=data;
            })
        }
    }

    var sister = {
        template: "<h1 @click='sisters'>我是妹妹</h1>",
        data() {
            return {
                sister_: "我是妹妹:我要给你介绍一个妹子"
            }
        },
        methods: {
            sisters() {
                VueEvent.$emit('girls', this.sister_)
            }
        }
    }



    var vm = new Vue({
        el: "#app",
        data: {
            msg: "我是app身上的=的属性值",
            recive: ""
        },
        methods: {

        },
        components: {
            brother,
            sister
        }
    })
</script>

</html>